import { defineStore } from "pinia";
import type { choisesvideoAll } from "@/api/discovery";
import { reqVipZoneList } from "@/api/discovery";

interface choisesvideoAllStore {
  choisesLabelAllList: choisesvideoAll[];
}

// 标签列表仓库
export const useChoisesVideoStore = defineStore("choisesvideo", {
  state: (): choisesvideoAllStore => {
    return {
      choisesLabelAllList: [],
    }
  },
  actions: {
    // 获取选择属性列表
    async getChooseList() {
      try {
        this.choisesLabelAllList = await reqVipZoneList();
        const choisesLabelAllLists = JSON.parse(JSON.stringify(this.choisesLabelAllList))
        // console.log(choisesLabelAllLists)
      } catch (e) {
        alert("获取视频失败");
      }
    },
  },
});
